<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/aftersaleinfo/install_request_notarize/q_install_request_notarize.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/aftersaleinfo/install_request_notarize/q_install_request_notarize.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Install_request_notarize',
                footer: "Foots",
                cnName: '安装完成确认单',
                name: 'install_request_notarize/q_install_request_notarize',
                url: "/q_install_request_notarize/",
                sortName: "Voucher_sub"
            });
            const editFormFields = ref({"Voucher_sub":"","Voucher_sub_install_request":"","Client":"","Install_date":"","Gong_shi":"","Install_address":"","Proposer":"","Remark":"","Attachment":"","Image":"","Install_requestID":""});
            const editFormOptions = ref([[{"title":"单据编码","field":"Voucher_sub"},
                               {"dataKey":"无条件客户","data":[],"title":"客户","field":"Client","type":"select"},
                               {"title":"安装申请单","required":true,"field":"Voucher_sub_install_request","colSize":6,"type":"text"}],
                              [{"title":"安装人员","required":true,"field":"Proposer","type":"text"},
                               {"title":"安装时间","required":true,"field":"Install_date","type":"date"},
                               {"title":"工时","field":"Gong_shi","type":"number"},
                               {"title":"安装地址","required":true,"field":"Install_address","type":"text"}],
                              [{"title":"备注","field":"Remark","colSize":6,"type":"textarea"},
                               {"title":"附件","field":"Attachment","colSize":3,"type":"file"},
                               {"title":"图片","field":"Image","colSize":3,"type":"img"}],
                              [{"title":"安装申请单ID","required":true,"field":"Install_requestID","type":"text"}]]);
            const searchFormFields = ref({"Voucher_sub":"","Voucher_sub_install_request":"","Client":"","Proposer":"","AuditStatus":"","CreateDate":""});
            const searchFormOptions = ref([[{"title":"单据编码","field":"Voucher_sub","type":"like"},{"title":"安装申请单","field":"Voucher_sub_install_request","type":"like"},{"dataKey":"无条件客户","data":[],"title":"客户","field":"Client","type":"select"}],[{"title":"安装人员","field":"Proposer","type":"text"},{"dataKey":"audit","data":[],"title":"审核状态","field":"AuditStatus","type":"select"},{"title":"创建时间","field":"CreateDate","type":"datetime"}]]);
            const columns = ref([{field:'Voucher_sub',title:'单据编码',type:'string',link:true,width:180,align:'left',sort:true},
                       {field:'Voucher_sub_install_request',title:'安装申请单',type:'string',width:180,require:true,align:'left'},
                       {field:'Client',title:'客户',type:'int',bind:{ key:'无条件客户',data:[]},width:110,align:'left'},
                       {field:'Install_date',title:'安装时间',type:'datetime',width:160,require:true,align:'left',sort:true},
                       {field:'Gong_shi',title:'工时',type:'float',width:80,align:'left'},
                       {field:'Install_address',title:'安装地址',type:'string',width:260,require:true,align:'left'},
                       {field:'Installation_cost',title:'安装费用',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'Proposer',title:'安装人员',type:'string',width:110,require:true,align:'left'},
                       {field:'AuditStatus',title:'审核状态',type:'int',bind:{ key:'audit',data:[]},width:110,align:'left'},
                       {field:'Remark',title:'备注',type:'string',width:220,align:'left'},
                       {field:'Attachment',title:'附件',type:'file',width:110,align:'left'},
                       {field:'Image',title:'图片',type:'img',width:110,align:'left'},
                       {field:'AuditDate',title:'审核时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'AuditID',title:'审核人员id',type:'int',width:110,hidden:true,align:'left'},
                       {field:'Auditor',title:'审核人员',type:'string',width:120,hidden:true,align:'left'},
                       {field:'CreateID',title:'创建人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人员',type:'string',width:100,hidden:true,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:160,hidden:true,align:'left',sort:true},
                       {field:'ModifyID',title:'修改人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人员',type:'string',width:100,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'Install_request_notarize',title:'ID',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'Install_requestID',title:'安装申请单ID',type:'guid',width:110,hidden:true,require:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
